rollup报错处理 您所在的位置:网站首页 rollup commonjs rollup报错处理

rollup报错处理

2023-03-19 23:03| 来源: 网络整理| 查看: 265

如果出现找不到模块”node:process“,一定是node版本问题,安装14.19以上,建议安装长期稳定版

[!] RollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.

Original error: Cannot use import statement outside a module

可以加package.json 里添加 "type" :"module" 就可以解决 ———————————————— 版权声明:本文为CSDN博主「阿咩_」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/weixin_67619405/article/details/129316022



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有